package com.hehui.module.goods.entity;

import java.util.ArrayList;
import java.util.List;

public class RefGoodsUnitExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public RefGoodsUnitExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andRefGoodsidIsNull() {
            addCriterion("ref_goodsId is null");
            return (Criteria) this;
        }

        public Criteria andRefGoodsidIsNotNull() {
            addCriterion("ref_goodsId is not null");
            return (Criteria) this;
        }

        public Criteria andRefGoodsidEqualTo(Long value) {
            addCriterion("ref_goodsId =", value, "refGoodsid");
            return (Criteria) this;
        }

        public Criteria andRefGoodsidNotEqualTo(Long value) {
            addCriterion("ref_goodsId <>", value, "refGoodsid");
            return (Criteria) this;
        }

        public Criteria andRefGoodsidGreaterThan(Long value) {
            addCriterion("ref_goodsId >", value, "refGoodsid");
            return (Criteria) this;
        }

        public Criteria andRefGoodsidGreaterThanOrEqualTo(Long value) {
            addCriterion("ref_goodsId >=", value, "refGoodsid");
            return (Criteria) this;
        }

        public Criteria andRefGoodsidLessThan(Long value) {
            addCriterion("ref_goodsId <", value, "refGoodsid");
            return (Criteria) this;
        }

        public Criteria andRefGoodsidLessThanOrEqualTo(Long value) {
            addCriterion("ref_goodsId <=", value, "refGoodsid");
            return (Criteria) this;
        }

        public Criteria andRefGoodsidIn(List<Long> values) {
            addCriterion("ref_goodsId in", values, "refGoodsid");
            return (Criteria) this;
        }

        public Criteria andRefGoodsidNotIn(List<Long> values) {
            addCriterion("ref_goodsId not in", values, "refGoodsid");
            return (Criteria) this;
        }

        public Criteria andRefGoodsidBetween(Long value1, Long value2) {
            addCriterion("ref_goodsId between", value1, value2, "refGoodsid");
            return (Criteria) this;
        }

        public Criteria andRefGoodsidNotBetween(Long value1, Long value2) {
            addCriterion("ref_goodsId not between", value1, value2, "refGoodsid");
            return (Criteria) this;
        }

        public Criteria andRefUnitidIsNull() {
            addCriterion("ref_unitId is null");
            return (Criteria) this;
        }

        public Criteria andRefUnitidIsNotNull() {
            addCriterion("ref_unitId is not null");
            return (Criteria) this;
        }

        public Criteria andRefUnitidEqualTo(Long value) {
            addCriterion("ref_unitId =", value, "refUnitid");
            return (Criteria) this;
        }

        public Criteria andRefUnitidNotEqualTo(Long value) {
            addCriterion("ref_unitId <>", value, "refUnitid");
            return (Criteria) this;
        }

        public Criteria andRefUnitidGreaterThan(Long value) {
            addCriterion("ref_unitId >", value, "refUnitid");
            return (Criteria) this;
        }

        public Criteria andRefUnitidGreaterThanOrEqualTo(Long value) {
            addCriterion("ref_unitId >=", value, "refUnitid");
            return (Criteria) this;
        }

        public Criteria andRefUnitidLessThan(Long value) {
            addCriterion("ref_unitId <", value, "refUnitid");
            return (Criteria) this;
        }

        public Criteria andRefUnitidLessThanOrEqualTo(Long value) {
            addCriterion("ref_unitId <=", value, "refUnitid");
            return (Criteria) this;
        }

        public Criteria andRefUnitidIn(List<Long> values) {
            addCriterion("ref_unitId in", values, "refUnitid");
            return (Criteria) this;
        }

        public Criteria andRefUnitidNotIn(List<Long> values) {
            addCriterion("ref_unitId not in", values, "refUnitid");
            return (Criteria) this;
        }

        public Criteria andRefUnitidBetween(Long value1, Long value2) {
            addCriterion("ref_unitId between", value1, value2, "refUnitid");
            return (Criteria) this;
        }

        public Criteria andRefUnitidNotBetween(Long value1, Long value2) {
            addCriterion("ref_unitId not between", value1, value2, "refUnitid");
            return (Criteria) this;
        }

        public Criteria andRefTotalIsNull() {
            addCriterion("ref_total is null");
            return (Criteria) this;
        }

        public Criteria andRefTotalIsNotNull() {
            addCriterion("ref_total is not null");
            return (Criteria) this;
        }

        public Criteria andRefTotalEqualTo(Integer value) {
            addCriterion("ref_total =", value, "refTotal");
            return (Criteria) this;
        }

        public Criteria andRefTotalNotEqualTo(Integer value) {
            addCriterion("ref_total <>", value, "refTotal");
            return (Criteria) this;
        }

        public Criteria andRefTotalGreaterThan(Integer value) {
            addCriterion("ref_total >", value, "refTotal");
            return (Criteria) this;
        }

        public Criteria andRefTotalGreaterThanOrEqualTo(Integer value) {
            addCriterion("ref_total >=", value, "refTotal");
            return (Criteria) this;
        }

        public Criteria andRefTotalLessThan(Integer value) {
            addCriterion("ref_total <", value, "refTotal");
            return (Criteria) this;
        }

        public Criteria andRefTotalLessThanOrEqualTo(Integer value) {
            addCriterion("ref_total <=", value, "refTotal");
            return (Criteria) this;
        }

        public Criteria andRefTotalIn(List<Integer> values) {
            addCriterion("ref_total in", values, "refTotal");
            return (Criteria) this;
        }

        public Criteria andRefTotalNotIn(List<Integer> values) {
            addCriterion("ref_total not in", values, "refTotal");
            return (Criteria) this;
        }

        public Criteria andRefTotalBetween(Integer value1, Integer value2) {
            addCriterion("ref_total between", value1, value2, "refTotal");
            return (Criteria) this;
        }

        public Criteria andRefTotalNotBetween(Integer value1, Integer value2) {
            addCriterion("ref_total not between", value1, value2, "refTotal");
            return (Criteria) this;
        }

        public Criteria andRefLevelIsNull() {
            addCriterion("ref_level is null");
            return (Criteria) this;
        }

        public Criteria andRefLevelIsNotNull() {
            addCriterion("ref_level is not null");
            return (Criteria) this;
        }

        public Criteria andRefLevelEqualTo(String value) {
            addCriterion("ref_level =", value, "refLevel");
            return (Criteria) this;
        }

        public Criteria andRefLevelNotEqualTo(String value) {
            addCriterion("ref_level <>", value, "refLevel");
            return (Criteria) this;
        }

        public Criteria andRefLevelGreaterThan(String value) {
            addCriterion("ref_level >", value, "refLevel");
            return (Criteria) this;
        }

        public Criteria andRefLevelGreaterThanOrEqualTo(String value) {
            addCriterion("ref_level >=", value, "refLevel");
            return (Criteria) this;
        }

        public Criteria andRefLevelLessThan(String value) {
            addCriterion("ref_level <", value, "refLevel");
            return (Criteria) this;
        }

        public Criteria andRefLevelLessThanOrEqualTo(String value) {
            addCriterion("ref_level <=", value, "refLevel");
            return (Criteria) this;
        }

        public Criteria andRefLevelLike(String value) {
            addCriterion("ref_level like", value, "refLevel");
            return (Criteria) this;
        }

        public Criteria andRefLevelNotLike(String value) {
            addCriterion("ref_level not like", value, "refLevel");
            return (Criteria) this;
        }

        public Criteria andRefLevelIn(List<String> values) {
            addCriterion("ref_level in", values, "refLevel");
            return (Criteria) this;
        }

        public Criteria andRefLevelNotIn(List<String> values) {
            addCriterion("ref_level not in", values, "refLevel");
            return (Criteria) this;
        }

        public Criteria andRefLevelBetween(String value1, String value2) {
            addCriterion("ref_level between", value1, value2, "refLevel");
            return (Criteria) this;
        }

        public Criteria andRefLevelNotBetween(String value1, String value2) {
            addCriterion("ref_level not between", value1, value2, "refLevel");
            return (Criteria) this;
        }

        public Criteria andRefBarcodeIsNull() {
            addCriterion("ref_barCode is null");
            return (Criteria) this;
        }

        public Criteria andRefBarcodeIsNotNull() {
            addCriterion("ref_barCode is not null");
            return (Criteria) this;
        }

        public Criteria andRefBarcodeEqualTo(String value) {
            addCriterion("ref_barCode =", value, "refBarcode");
            return (Criteria) this;
        }

        public Criteria andRefBarcodeNotEqualTo(String value) {
            addCriterion("ref_barCode <>", value, "refBarcode");
            return (Criteria) this;
        }

        public Criteria andRefBarcodeGreaterThan(String value) {
            addCriterion("ref_barCode >", value, "refBarcode");
            return (Criteria) this;
        }

        public Criteria andRefBarcodeGreaterThanOrEqualTo(String value) {
            addCriterion("ref_barCode >=", value, "refBarcode");
            return (Criteria) this;
        }

        public Criteria andRefBarcodeLessThan(String value) {
            addCriterion("ref_barCode <", value, "refBarcode");
            return (Criteria) this;
        }

        public Criteria andRefBarcodeLessThanOrEqualTo(String value) {
            addCriterion("ref_barCode <=", value, "refBarcode");
            return (Criteria) this;
        }

        public Criteria andRefBarcodeLike(String value) {
            addCriterion("ref_barCode like", value, "refBarcode");
            return (Criteria) this;
        }

        public Criteria andRefBarcodeNotLike(String value) {
            addCriterion("ref_barCode not like", value, "refBarcode");
            return (Criteria) this;
        }

        public Criteria andRefBarcodeIn(List<String> values) {
            addCriterion("ref_barCode in", values, "refBarcode");
            return (Criteria) this;
        }

        public Criteria andRefBarcodeNotIn(List<String> values) {
            addCriterion("ref_barCode not in", values, "refBarcode");
            return (Criteria) this;
        }

        public Criteria andRefBarcodeBetween(String value1, String value2) {
            addCriterion("ref_barCode between", value1, value2, "refBarcode");
            return (Criteria) this;
        }

        public Criteria andRefBarcodeNotBetween(String value1, String value2) {
            addCriterion("ref_barCode not between", value1, value2, "refBarcode");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}